﻿using System;
using System.Collections.Generic;
using System.Linq;
using vsarFlightPlan.ViewModels;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236

namespace vsarFlightPlan
{
    public sealed partial class StatusLegend : UserControl
    {
        public StatusLegend()
        {
            this.InitializeComponent();
        }

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            var lst = new List<ProjectStatus>();
            foreach (ProjectStatus item in Enum.GetValues(typeof(ProjectStatus)))
            {
                lst.Add(item);
            }
            LstProjectStatuses.ItemsSource = lst.Select(o => new StatusLegendItem { Data = o }).ToList();
        }

        public class StatusLegendItem
        {
            public ProjectStatus Data { get; set; }
        }
    }
}